package com.tianquan.test.redisAop;/**
 * @author starsea
 * @date 2024-10-09 下午4:58
 */


import java.io.Serializable;
import java.util.Objects;

/**
 *@BelongsProject: uploaddemo
 *@BelongsPackage: com.tianquan.redisCache
 *@Author: tianquan
 *@CreateTime: 2024-10-09  16:58
 *@Description: 测试
 *@Version: 1.0
 */

public class User implements Serializable {
    private Long id;
    private String name;
    private Integer age;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id) && Objects.equals(name, user.name) && Objects.equals(age, user.age);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, age);
    }

    public User(Long id, String name, Integer age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }


    public User() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
